package com.example.xiaomi.controller;


import com.example.xiaomi.entity.contents;
import com.example.xiaomi.entity.wordnet;
import com.example.xiaomi.service.ContentsService;
import com.example.xiaomi.service.WordnetService;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("wordnet")
@CrossOrigin  //允许跨域
public class WordnetController {
    @Autowired
    private WordnetService service;
    /**
     * http://localhost:8080/wordnet/list
     */
    @GetMapping("/list")
    public List<wordnet> getWordnet(){
        List<wordnet> infoList=service.findWordnet();
        return infoList;
    }
}
